<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateStldsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('stlds', function(Blueprint $table)
		{
			$table->increments('id');
			$table->string('no_ktp');
			$table->integer('lokasi_id');
			$table->string('nama');
			$table->integer('agama_id');
			$table->char('jenis_kelamin', 1);
			$table->string('tempat_lahir', 30);
			$table->date('tanggal_lahir');
			$table->enum('status_kawin', array('kawin','belum kawin','cerai mati', 'cerai hidup'));
			$table->integer('jenis_pekerjaan_id');
			$table->integer('pendidikan_id');
			$table->text('alamat');
			$table->date('tanggal_lapor');
			$table->boolean('is_active')->default(1);
			$table->integer('user_id');
			$table->integer('ref_id')->nullable();
			$table->char('action', 1)->default(1);
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('stlds');
	}

}
